(function () {
    let myChart = echarts.init(document.querySelector(".column:nth-of-type(2) .box:nth-of-type(1)"));

    let option = {
        title: {
            text: "火辣辣占比",
            left: "center",
        },
        tooltip: {
            trigger: "item",
        },
        legend: {
            orient: "vertical",
            left: "left",
        },
        series: [
            {
                name: "Access From",
                type: "pie",
                radius: "50%",
                data: [
                    { value: 1048, name: "爆辣螺蛳粉" },
                    { value: 735, name: "周黑鸭" },
                    { value: 580, name: "火鸡面" },
                    { value: 484, name: "泡椒凤爪" },
                    { value: 300, name: "红烧肉" },
                ],
                emphasis: {
                    itemStyle: {
                        shadowBlur: 10,
                        shadowOffsetX: 0,
                        shadowColor: "rgba(0, 0, 0, 0.5)",
                    },
                },
            },
        ],
    };
    //# 使用刚指定的配置项和数据显示图表
    myChart.setOption(option)

    window.addEventListener('resize', () => {
        myChart.resize()
    })
})();